/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dancrawler.sound;

/**
 *
 * @author Team 4 RMI, HINGDA10
 */
import java.net.URL;
import javax.swing.*;
import javax.sound.sampled.*;

/**
 *
 * @author noctvrnvs
 */
public class test {

    /**
   *
   * @param args
   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
        URL url = new URL(
            "file:///D:/Skole/H2012-V2013-3ING/RMI med prosjekt TDAT3014/dancrawler/build/classes/res/sounds/Oddbounce.ogg");
        Clip clip = AudioSystem.getClip();
        // getAudioInputStream() also accepts a File or InputStream
        AudioInputStream ais = AudioSystem.
            getAudioInputStream( url );
        clip.open(ais);
        clip.loop(Clip.LOOP_CONTINUOUSLY);
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                // A GUI element to prevent the Clip's daemon Thread
                // from terminating at the end of the main()
                JOptionPane.showMessageDialog(null, "Close to exit!");
            }
        });
    }
}